package com.shop.www.model;

import java.util.List;

public class User {//用户：买家，卖家，管理者
    private Integer user_ID;
    private String user_name;
    private String user_psw;
    private Integer role;
    private Integer state;

    private Cart cart;
    private List<Order> orderList;

    public User() {
    }

    public User(Integer user_ID) {
        this.user_ID = user_ID;
    }

    public User(Integer user_ID, String user_name, String user_psw, Integer role,Integer state) {
        this.user_ID = user_ID;
        this.user_name = user_name;
        this.user_psw = user_psw;
        this.role = role;
        this.state=state;
    }

    public User(String user_name, String user_psw, Integer role,Integer state) {
        this.user_name = user_name;
        this.user_psw = user_psw;
        this.role = role;
        this.state=state;
    }

    public User(Integer user_ID, Integer state) {
        this.user_ID = user_ID;
        this.state = state;
    }

    public Integer getUser_ID() {
        return user_ID;
    }

    public void setUser_ID(Integer user_ID) {
        this.user_ID = user_ID;
    }

    public String getUser_name() {
        return user_name;
    }

    public void setUser_name(String user_name) {
        this.user_name = user_name;
    }

    public String getUser_psw() {
        return user_psw;
    }

    public void setUser_psw(String user_psw) {
        this.user_psw = user_psw;
    }

    public Integer getRole() {
        return role;
    }

    public void setRole(Integer role) {
        this.role = role;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Cart getCart() {
        return cart;
    }

    public void setCart(Cart cart) {
        this.cart = cart;
    }

    public List<Order> getOrderList() {
        return orderList;
    }

    public void setOrderList(List<Order> orderList) {
        this.orderList = orderList;
    }

    @Override
    public String toString() {
        return "User{" +
                "user_ID=" + user_ID +
                ", user_name='" + user_name + '\'' +
                ", user_psw=" + user_psw +
                ", role=" + role +
                '}';
    }
}

